package com.google.gwt.sample.stockwatcher.client;

import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;

@SuppressWarnings("deprecation")
public class StockPrice_FieldSerializer {
  public static class Handler implements com.google.gwt.user.client.rpc.impl.TypeHandler {
    public void deserialize(SerializationStreamReader reader, Object object) throws SerializationException {
      com.google.gwt.sample.stockwatcher.client.StockPrice_FieldSerializer.deserialize(reader, (com.google.gwt.sample.stockwatcher.client.StockPrice)object);
    }
    public Object instantiate(SerializationStreamReader reader) throws SerializationException {
      return com.google.gwt.sample.stockwatcher.client.StockPrice_FieldSerializer.instantiate(reader);
    }
    public void serialize(SerializationStreamWriter writer, Object object) throws SerializationException {
      com.google.gwt.sample.stockwatcher.client.StockPrice_FieldSerializer.serialize(writer, (com.google.gwt.sample.stockwatcher.client.StockPrice)object);
    }
  }
  private static native double getChange(com.google.gwt.sample.stockwatcher.client.StockPrice instance) /*-{
    return instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::change;
  }-*/;
  
  private static native void  setChange(com.google.gwt.sample.stockwatcher.client.StockPrice instance, double value) /*-{
    instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::change = value;
  }-*/;
  
  private static native double getPrice(com.google.gwt.sample.stockwatcher.client.StockPrice instance) /*-{
    return instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::price;
  }-*/;
  
  private static native void  setPrice(com.google.gwt.sample.stockwatcher.client.StockPrice instance, double value) /*-{
    instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::price = value;
  }-*/;
  
  private static native java.lang.String getSymbol(com.google.gwt.sample.stockwatcher.client.StockPrice instance) /*-{
    return instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::symbol;
  }-*/;
  
  private static native void  setSymbol(com.google.gwt.sample.stockwatcher.client.StockPrice instance, java.lang.String value) /*-{
    instance.@com.google.gwt.sample.stockwatcher.client.StockPrice::symbol = value;
  }-*/;
  
  public static Class<?> concreteType() {
    return com.google.gwt.sample.stockwatcher.client.StockPrice.class;
  }
  
  public static void deserialize(SerializationStreamReader streamReader, com.google.gwt.sample.stockwatcher.client.StockPrice instance) throws SerializationException {
    setChange(instance, streamReader.readDouble());
    setPrice(instance, streamReader.readDouble());
    setSymbol(instance, streamReader.readString());
    
  }
  
  public static com.google.gwt.sample.stockwatcher.client.StockPrice instantiate(SerializationStreamReader streamReader) throws SerializationException {
    return new com.google.gwt.sample.stockwatcher.client.StockPrice();
  }
  
  public static void serialize(SerializationStreamWriter streamWriter, com.google.gwt.sample.stockwatcher.client.StockPrice instance) throws SerializationException {
    streamWriter.writeDouble(getChange(instance));
    streamWriter.writeDouble(getPrice(instance));
    streamWriter.writeString(getSymbol(instance));
    
  }
  
}
